package com.itheima.mapper;

import com.itheima.dto.EmployeeRegisterDTO;
import com.itheima.ship.po.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 郑哥
 * @since 2024-05-18
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {

    @Select("select * from employee where username = #{username}")
    Employee getEmployeeByUsername(String username);

    @Update("update employee set status = #{status} where id = #{id}")
    void updataStatusById(Integer status, Long id);
}
